package cn.jaye.fabric.common.constants;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author Jaye
 * @create 2018-03-19 13:46
 */
@Component
@PropertySource("classpath:fabric.yml")
@ConfigurationProperties(prefix = "farbic", ignoreUnknownFields = false)
@Data
public class FarbicConstant {


    @Value("${test}")
    private String test;

    @Value("${channel-transaction-wait-time}")
    private Integer channelTransactionWaitTime;
    @Value("${channel-invoke-wait-time}")
    private Integer channelInvokeWaitTime;
    @Value("${channel-deploy-wait-time}")
    private Integer channelDeployWaitTime;
    @Value("${channel-proposal-wait-time}")
    private Integer channelProposalWaitTime;
    @Value("${chaincode-default-version}")
    private String chainCodeDefaultVersion;
    @Value("${chaincode-default-path}")
    private String chainCodeDefaultPath;
    @Value("${channel-config-tx-path}")
    private String channelConfigTxPath;
    @Value("${chaincode-source-location}")
    private String chainCodeSourceLocation;
    @Value("${chaincode-endorsement-policy}")
    private String chainCodeEndorsementPolicy;
    @Value("${admin-username}")
    private String adminUsername;
    @Value("${admin-password}")
    private String adminPassword;
    @Value("${host-address}")
    private String hostAddress;
    @Value("${keyStore-location}")
    private String keyStoreLocation;

    @Value("${peer-ca-pem-default-path}")
    private String peerCaPemDefaultPath;
}
